-- GENERATED SPELL FOR [Hungering Wraith] --


function spell0_1802(pUnit, Event) --@Altered Cauldron Toxin,n/a--
pUnit:FullCastSpellOnTarget(17650,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1802', 581, 1)
end

function spell1_1802(pUnit, Event) --@Debilitating Touch,n/a--
pUnit:FullCastSpellOnTarget(16333,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1802', 628, 1)
end

function spell2_1802(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_1802', 533, 1)
end

function Sorts_1802(pUnit, Event)
local choix_sorts_1802 = math.random(0, 2)
if choix_sorts_1802 == 0 then
pUnit:RegisterEvent('spell0_1802', 1, 1)
end
if choix_sorts_1802 == 1 then
pUnit:RegisterEvent('spell1_1802', 1, 1)
end
if choix_sorts_1802 == 2 then
pUnit:RegisterEvent('spell2_1802', 1, 1)
end
end

function mob1802_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1802', math.random(1500, 3000), 1)
end

function mob1802_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1802_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1802_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1802, 1, 'mob1802_Action')
RegisterUnitEvent(1802, 2, 'mob1802_Leave')
RegisterUnitEvent(1802, 3, 'mob1802_Kill')
RegisterUnitEvent(1802, 4, 'mob1802_Die')
